import React, { Component } from 'react';
import './Logo.scss'

export default class Logo extends Component {

  constructor(props) {
    super(props);
    // console.log("props",props)
    this.state = {
      secuCode:'',
      company:''
    }
  }
  componentWillMount(){

  }

  componentDidMount(){
    this.setState({
      company:this.props.company,
      secuCode:this.props.secuCode
    })
    console.log("secuCode",this.props.secuCode)
    console.log("company",this.props.company)
  }

  componentWillReceiveProps(){

  }

  render() {
    return (
      <div style={styles.container}>
        <img
          src='./assetc/logo.png'
          style={styles.logoImg}
          alt="logo"
        />
        <span className="logotext">{this.state.secuCode} ({this.state.company})</span>
      </div>
    );
  }
}

const styles = {
  container: {
    display: 'flex',
    alignItems: 'center',
    // marginRight: '20px',
  },
  logoImg: {
    width: '100px',
    padding: '15px 0'
  },
  logoText: {
    display: 'block',
    // maxWidth: '120px',
    // overflow: 'hidden',
    textOverflow: 'ellipsis',
    whiteSpace: 'nowrap',
    marginLeft: '10px',
    paddingLeft: '10px',
    verticalAlign:'10px',
    fontSize: '24px',
    color: '#d8a874',
    // fontWeight: 'bold',
  },
};
